package cn.xy.basic.util;

import lombok.Data;

/**
 * 封装工具类，用以新增修改删除的成果或者失败信息返回
 */
@Data
public class AjaxResult {
    private Boolean success = true;  //默认等于true
    private String message = "操作成功";
    private Object resultObj;

    public static AjaxResult me(){
        return new AjaxResult();
    }

    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }

    public AjaxResult setResultObj(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }
}
